import torch
import torch.nn as nn

#简单的神经网络
class SimpleNN(nn.Module):
    def __init__(self):
        super(SimpleNN, self).__init__()
        #定义输入到隐藏层的全连接层
        self.fc1 = nn.Linear(2, 2)
        #定义隐藏层到输出层的全连接层
        self.fc2 = nn.Linear(2, 1)

    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

model = SimpleNN()
print(model)